package com.yt.service;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixProperty;
import com.yt.entity.CommonResult;
import com.yt.entity.Novel;
import com.yt.service.impl.ProviderServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;
@Component
@FeignClient(value = "HYSTRIX-PROVIDER",fallback = ProviderServiceFallback.class )
public interface ProviderService {
    @GetMapping("/message/{ren}")
    public String getMessage(@PathVariable("ren") int ren);

    @GetMapping("/mes/{ren}")
    public String getMes(@PathVariable("ren") int ren);
}
